import axios from '../utils/request'
import base from './base'

const api = {
    getLogin(params) {
        return axios.post(base.baseUrl + base.login, params)
    },

    getMenu(role) {
        return axios.get(base.baseUrl + base.menu, {
            params: { user: role }
        })
    },
    getLine() {
        return axios.get(base.baseUrl + base.line)
    },

    getProjectInfo(params) {
        return axios.get(base.baseUrl + base.projectInfo, {
            params
        })
    },

    getProjectSearch(params) {
        return axios.get(base.baseUrl + base.projectSearch, {
            params
        })
    },

    getProjectTotal() {
        return axios.get(base.baseUrl + base.projectTotal)
    },

    getAddProject(params) {
        return axios.get(base.baseUrl + base.projectAdd, { params })
    },

    getProjectDel(params) {
        return axios.get(base.baseUrl + base.ProjectDelete, { params })
    },

    putProjectUpdate(id, params) {
        return axios.put(base.baseUrl + base.projectUpdate + id, params)
    },
}

export default api